Request a single DSA code execution. Please note that if you are running SQLite, you must pass additionalFilesAsZip as a ZIP file that must contain db.sqlite file (exact name) when unzipped.
Authentication with the “FERMION-API-KEY” header is required to use this endpoint.
Rate limit: Maximum 5000 requests in a window of 1m.
curl --request POST \
--url https://backend.codedamn.com/api/public/request-dsa-code-execution \
--header 'Content-Type: application/json' \
--header 'FERMION-API-KEY: <api-key>' \
--data '
{
"data": [
{
"data": {
"language": "C",
"runConfig": {
"customMatcherToUseForExpectedOutput": "ExactMatch",
"expectedOutputAsBase64UrlEncoded": "<string>",
"stdinStringAsBase64UrlEncoded": "<string>",
"callbackUrlOnExecutionCompletion": "<string>",
"shouldEnablePerProcessAndThreadCpuTimeLimit": false,
"shouldEnablePerProcessAndThreadMemoryLimit": false,
"shouldAllowInternetAccess": false,
"compilerFlagString": "",
"maxFileSizeInKilobytesFilesCreatedOrModified": 51200,
"stackSizeLimitInKilobytes": 65536,
"cpuTimeLimitInMilliseconds": 2000,
"wallTimeLimitInMilliseconds": 5000,
"memoryLimitInKilobyte": 512000,
"maxProcessesAndOrThreads": 60
},
"sourceCodeAsBase64UrlEncoded": "<string>",
"additionalFilesAsZip": {
"type": "base64url-encoding",
"base64UrlEncodedZip": "<string>"
}
}
}
]
}
'[
{
"output": {
"status": "ok",
"data": {
"taskId": "<string>"
}
}
}
]API Request Body
Show child attributes
Show child attributes
Programming language for code execution
C, Cpp, Java, Python, Nodejs, Sqlite_3_48_0, Golang_1_19, Rust_1_87, Dotnet_8, Mysql_8 Configuration for code execution environment and test cases
Show child attributes
ExactMatch, IgnoreWhitespaceAtStartAndEnd, IgnoreWhitespaceAtStartAndEndCaseInsensitive, IgnoreWhitespaceAtStartAndEndForEveryLine, IgnoreWhitespaceAtStartAndEndForEveryLineCaseInsensitive Provide a URL on which Fermion would sent a POST request with the result in body after execution is completed
5120 <= x <= 5120000 <= x <= 1280000 <= x <= 50000 <= x <= 70000 <= x <= 10240001 <= x <= 120Source code to execute, encoded as base64url
Optional additional files as a ZIP archive. Required for SQLite with db.sqlite file.
Show child attributes
API Response Body
curl --request POST \
--url https://backend.codedamn.com/api/public/request-dsa-code-execution \
--header 'Content-Type: application/json' \
--header 'FERMION-API-KEY: <api-key>' \
--data '
{
"data": [
{
"data": {
"language": "C",
"runConfig": {
"customMatcherToUseForExpectedOutput": "ExactMatch",
"expectedOutputAsBase64UrlEncoded": "<string>",
"stdinStringAsBase64UrlEncoded": "<string>",
"callbackUrlOnExecutionCompletion": "<string>",
"shouldEnablePerProcessAndThreadCpuTimeLimit": false,
"shouldEnablePerProcessAndThreadMemoryLimit": false,
"shouldAllowInternetAccess": false,
"compilerFlagString": "",
"maxFileSizeInKilobytesFilesCreatedOrModified": 51200,
"stackSizeLimitInKilobytes": 65536,
"cpuTimeLimitInMilliseconds": 2000,
"wallTimeLimitInMilliseconds": 5000,
"memoryLimitInKilobyte": 512000,
"maxProcessesAndOrThreads": 60
},
"sourceCodeAsBase64UrlEncoded": "<string>",
"additionalFilesAsZip": {
"type": "base64url-encoding",
"base64UrlEncodedZip": "<string>"
}
}
}
]
}
'[
{
"output": {
"status": "ok",
"data": {
"taskId": "<string>"
}
}
}
]